/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SLE_CONNECT_SERVER_H
#define SLE_CONNECT_SERVER_H

#include <memory>
#include "sle_connect_stub.h"

namespace OHOS {
namespace NearLink {
namespace SleStandard {
class SleConnectServer : public SleConnectStub {
public:
    SleConnectServer();
    ~SleConnectServer();

    SleErrorCode RegisterConnectCallback(const sptr<ISleConnectCallback> &callback) override;
    SleErrorCode UnregisterConnectCallback(const sptr<ISleConnectCallback> &callback) override;
    SleErrorCode Connect(const SleAddress &address) override;
    SleErrorCode Disconnect(const SleAddress &address) override;
    SleErrorCode GetConnectId(const SleAddress &address, uint16_t &connectId) override;
    SleErrorCode GetConnectState(const SleAddress &address, int32_t &state) override;
    SleErrorCode GetConnectDeviceList(std::vector<SleConnectDevice> &devices, uint16_t &number) override;
    SleErrorCode UpdateConnectParam(uint16_t connectId, const SleConnectionParam &param) override;
    SleErrorCode UpdateAllConnectParam(std::vector<SleConnectDevice> &successUpdateDev, uint16_t &number) override;
    SleErrorCode GetRecomSendDataSize(uint16_t connectId, uint32_t &recomSendDataSize) override;
    SleErrorCode SendPairRequest(const SleAddress &address) override;
    SleErrorCode RemovePairedDevice(const SleAddress &address) override;
    SleErrorCode RemoveAllPairedDevices() override;
    SleErrorCode GetPairedDevicesNum(uint16_t &number) override;
    SleErrorCode GetPairedDevices(std::vector<SleAddress> &devices, uint16_t &number) override;
    SleErrorCode GetPairState(const SleAddress &address, uint8_t &state) override;
    SleErrorCode ReadRemoteRssi(uint16_t connectId) override;

private:
    class SleConnectServerImpl;
    std::unique_ptr<SleConnectServerImpl> pimpl_;
};
} // SleStandard
} // NearLink
} // Ohos

#endif // SLE_CONNECT_SERVER_H